#include <csetjmp>
#include <csignal>
#include <iostream>

#include "gtest/gtest.h"
#include "nosal/demolib/common.h"
#include "nosal/demolib/context.h"
#include "nosal/demolib/register.h"

using namespace ::testing;
using namespace netaos::nosal::demo::lib;

TEST(RegisterTest, RegisterAndUnregisterContext) {
    std::string context_id = "text_ctx";
    std::string description = "This is test for demolib";
    Context     ctx(context_id, description);

    ReturnValue ret = RegisterContext(ctx);
    EXPECT_EQ(ret, ReturnValue::kOk);

    ReturnValue ret1 = UnregisterContext(ctx);
    EXPECT_EQ(ret1, ReturnValue::kOk);
}
